<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="MvcContrib.FluentHtml.ModelViewPage<Universum.Views.Blogs.BlogIndexViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=(this.Model.Blog!=null?this.Model.Blog.Name:"Blogs")%>
</asp:Content>
<asp:Content ID="BreadcrumbsContent" ContentPlaceHolderID="Breadcrumbs" runat ="server">
<%= Html.Breadcrumb().Home().AppendText("Create new blog").End() %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="span-7 ">
<% Html.RenderPartial("_NavBarUC",Model.NavBarModel); %>
</div>
<div class="span-15 last">
	<p>
		<%
			if (Model.Blog == null && Html.UsernameInRequest() == Html.LoggedInUser().Identity.Name)
			{
		%>
		<p>
			You don't have a blog. <span>
				<% using (Html.BeginForm<BlogsController>(controller => controller.Create(), FormMethod.Post))
	   {
				%>
				<%=this.SubmitButton("Create one")%>
				<%
			} %>
			</span>
		</p>
		<%
			}
			else
			{
		%>
			<p>This user doesn't have a blog.</p>
		<%} %>
		
	</p>
	</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
</asp:Content>
